#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include "InsertSort.h"

void Print(int* arr, int len)
{
	assert(arr);
	for (int i = 0; i < len; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
}

void TestInsertSort()
{
	const int N = 10;
	int* arr = (int*)malloc(sizeof(int) * N);
	for (int i = 0; i < N; i++)arr[i] = rand()%100;
	Print(arr, N);
	InsertSort(arr, N);
	Print(arr, N);

	free(arr);
	arr = NULL;
}

int main()
{
	srand(time(0));
	TestInsertSort();
	return 0;
}